﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Codemonk.Updater.Server;
namespace Codemonk.Updater.SocketHost
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args == null || args.Length == 0) return;
            var array = args[0].Split(new[] { '=' }, StringSplitOptions.RemoveEmptyEntries);
            if (array[0].ToLower() != "port") return;
            int port = -1;
            int.TryParse(array[1].Trim(), out port);
            if (port < 0) return;
            using (var server = new SocketUpdateServer(port))
            {
                server.Start();
            }
        }
    }
}
